#ifndef PROCESS_H
#define PROCESS_H

#include"instruction.h"

typedef enum ProcessState{
  RUNNING, BLOCKED, RUNNABLE
}ProcessState;

typedef enum ProcessType{
  UI, CALC, PROD, CONS
}ProcessType;

typedef enum IO_SOURCE{
  KEYBOARD, JOYSTICK
}IO_SOURCE;

typedef enum PROC_PRIORITY{
  PRIORITY_VERY_LOW, PRIORITY_LOW, PRIORITY_AVG, PRIORITY_HIGH, PRIORITY_VERY_HIGH
}PROC_PRIORITY;

typedef struct Process{
  int PC;
  ProcessState s;
  ProcessType t;
  Instruction* instructions;
  int inst_size;
  int priority;
}Process;

int procInit(Process*, ProcessType ,Instruction*, int, PROC_PRIORITY);
Instruction procNextInstruction(Process*);
char* procStateToString(ProcessState);
char* procTypeToString(ProcessType);

Process* createUI();
Process* createCalc();
Process* createProd(int);
Process* createCons(int);

#endif
